import request from '@/utils/request'

// 查询本地隔离列表
export function listPartitionBD(query) {
  return request({
    url: '/base/lock/list',
    method: 'get',
    params: query
  })
}

// 查询隔离详细
export function getPartitionBD(plugId) {
  return request({
    url: '/base/lock/' + plugId,
    method: 'get'
  })
}

// 新增隔离记录
export function addPartitionBD(data) {
  return request({
    url: '/base/lock',
    method: 'post',
    data: data
  })
}

// 修改隔离记录
export function updatePartitionBD(data) {
  return request({
    url: '/base/lock',
    method: 'put',
    data: data
  })
}

// 删除补料记录
export function delReplenish(pkids) {
  return request({
    url: '/base/lock/' + pkids,
    method: 'delete'
  })
}

// 下发仓库
export function transmitReplenish(plugIds) {
  return request({
    url: '/pull/plug/materialIssued',
    method: 'post',
    data: plugIds
  })
}

// 导出补料记录
export function exportReplenish(query) {
  return request({
    url: '/prod/plan/export',
    method: 'get',
    params: query
  })
}
